from rich import print
from rich.table import Table

# 输出格式化的文本
print("[bold magenta]Hello[/bold magenta] [green]World[/green]!")

# 输出格式化的表格
table = Table(title="Star Wars Movies")

table.add_column("Release Date", style="cyan", no_wrap=True)
table.add_column("Title", style="magenta")
table.add_column("Box Office", justify="right", style="green")

table.add_row("19.12.77", "Star Wars: Episode IV - A New Hope", "$775.8 million")
table.add_row("21.06.80", "Star Wars: Episode V - The Empire Strikes Back", "$540 million")
table.add_row("25.05.83", "Star Wars: Episode VI - Return of the Jedi", "$572.7 million")

print(table)
